#include "bullet.h"
#include <QPixmap>

Bullet::Bullet(QGraphicsItem *parent) : QGraphicsPixmapItem(parent)
{
    setPixmap(QPixmap(":/assets/bullet.png").scaled(10, 10));

    m_speed = 10.0;
    m_damage = 25;
}

void Bullet::setDirection(const QPointF &direction)
{
    m_direction = direction;
}

void Bullet::move()
{
    setPos(pos() + m_direction);
}

int Bullet::damage() const
{
    return m_damage;
}

qreal Bullet::speed() const
{
    return m_speed;
}
